package openbang.chatroom.service.intf;

import java.util.List;
import java.util.Set;

import openbang.chatroom.service.vo.ChatGroup;
import openbang.chatroom.service.vo.ChatMsg;


import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("chatService")
public interface ChatServiceAsync{

	void getAllGroup(AsyncCallback<List<ChatGroup>> callback);

	void createGroup(ChatGroup chatGroup, AsyncCallback<String> callback);

	void deleteGroup(String groupId , AsyncCallback<Integer> callback);

	void joinGroup(String groupId , String participant , String password, AsyncCallback<Integer> callback);

	void quitGroup(String groupId , String participant, AsyncCallback<Integer> callback);

	void getChatGroup(String groupId,
			AsyncCallback<ChatGroup> callback);

	void getNewChatMsg(String groupId, String token, String participant,
			AsyncCallback<List<ChatMsg>> callback);

	void sendMsg(String groupId, String participant, String msg,
			AsyncCallback<Integer> callback);

	void getParticipants(String groupId, AsyncCallback<Set<String>> callback);


}
